<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%--
    Created by IntelliJ IDEA.
    User: Re
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>购物车</title>
</head>
<body>
<div style="text-align: center">
    <form action="deleteShopCart" method="post">
        <input type="hidden" name="userId" value="${user.userId}">
    <table style="border: 2px">
        <tr>
            <th>商品名</th>
            <th>商品价格</th>
            <th>图片</th>
            <th>购买</th>
            <th>删除</th>
        </tr>
        <c:forEach items="${commoditiesMsg}" var="commodities">
            <tr>
                <td>${commodities.commodityName}</td>
                <td>${commodities.commodityPrice}</td>
                <td></td>
                <td style="text-align: center"><button type="submit" name="c_Id" value="${commodities.commodityId}">购买</button></td>
                <td style="text-align: center"><button type="submit" name="c_Id" value="${commodities.commodityId}">删除</button></td>
            </tr>
        </c:forEach>
    </table>
        <span style="color: red;font-size: 15px">${msg}</span>
    </form>
</div>
</body>
</html>
